package com.niit.mall.api.client;


import com.niit.mall.api.domain.vo.AddressVO;
import com.niit.mall.api.fallback.AddressClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @BelongsProject: pardo_mall_backend
 * @BelongsPackage: com.niit.mall.user.client
 * @Author: ChuXuan
 * @CreateTime: 2025-06-04  14:43
 * @Description: 地址模块的FeignClient
 * @Version: 1.0
 */

@FeignClient(value = "address-service", fallbackFactory = AddressClientFallbackFactory.class)
public interface AddressClient {
	
	/**
	 * 根据用户ID查询地址列表
	 *
	 * @return 地址视图对象列表
	 */
	@GetMapping("address/{userId}")
	public List<AddressVO> queryAddressByUserId(@PathVariable("userId") Long userId);
}
